package com.mass.core.framework.web.filter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 框架过滤器接口. <p />
 *
 * Created by tuyan on 15/10/31.
 */
public interface CherryFilter {

    /**
     * 执行请求过滤.
     * @param request   用户请求
     * @param response  服务器响应
     */
    void doFilter(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;

    /**
     * 是否已经发出了服务器响应信息.
     *
     * @return  如果是则返回True
     */
    boolean isSentResponse();
}
